import request from '@/utils/request.js'

// 获取年级列表
export function getGradeList() {
  return request({
    url: 'grades',
    method: 'GET'
  })
}

// 获取科目列表
export function getSubjectsByGradeType(gradeType) {
  return request({
    url: 'subjects/by-grade-type',
    method: 'GET',
    params: { gradeType }
  })
}

// 获取教师列表（基于年级和科目）
export function getTeachersByGradeAndSubject(params) {
  return request({
    url: 'teachers/filter',
    method: 'GET',
    params
  })
}

// 获取教师地图数据
export function getTeachersMapData(params) {
  return request({
    url: 'teachers/map',
    method: 'GET',
    params
  })
}

// 导出signupApi对象
export const signupApi = {
  getGradeList,
  getSubjectsByGradeType,
  getTeachersByGradeAndSubject,
  getTeachersMapData
} 